package com.linxz.video.protocol;

import com.linxz.video.pojo.FileUploadResp;
import com.linxz.video.pojo.LiveBroadCastListResp;

import io.reactivex.Observable;
import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.Query;

/**
 * @author Linxz
 * 创建日期：2020年12月30日 15:33
 * version：
 * 描述：
 */
public interface VideoApiStore {
    @GET("liveBroadCast/livings")
    Observable<LiveBroadCastListResp> getLiveBroadcastList(@Query("page") Integer page, @Query("size") Integer size);
    @Multipart
    @POST("file/upload")
    Observable<FileUploadResp> fileUpload(@Part("foldName") RequestBody foldName, @Part MultipartBody.Part file);
    @Multipart
    @POST("/videos/uploadVideo")
    Observable<FileUploadResp> uploadVideo(@Part MultipartBody.Part file,
                                           @Part("bmgId") RequestBody bmgId,
                                           @Part("tittle") RequestBody tittle,
                                           @Part("description") RequestBody description,
                                           @Part("videoSeconds") RequestBody videoSeconds,
                                           @Part("videoHeight") RequestBody videoHeight,
                                           @Part("videoWidth") RequestBody videoWidth,
                                           @Part("coverUrl") RequestBody coverUrl);

}
